package model;

import java.util.ArrayList;
import java.util.List;

public class Account {
    /**
     * 账号信息
     */
    //手机号
    private String phone;
    //密码
    private String password;
    //购物车
    private List<Treasure> shopCar;


    public Account(String  phone, String password){
        this.phone=phone;
        this.password=password;
    }
    public boolean login(Account account){
        if(this.getPhone().equals(account.getPhone())&&this.getPassword().equals(account.getPassword())){
            return true;
        }
        return false;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public ArrayList<Treasure> getShopCar() {
        return getShopCar();
    }
    public void setShopCar(ArrayList<Treasure> shopCar){
        this.shopCar=shopCar;
    }
}
